package com.x.erp.util;

public class Constant {
	public final static String blank = "";
	public final static String space = " ";
	public final static String star = "*";
	public final static String comma = ",";

	private final static String N_PRESS = "无";
	private final static String S_PRESS = "有";
	private final static String O_PRESS = "选配";
	private final static String N = "N";
	private final static String S = "S";
	private final static String O = "O";

	public static String CRM_SECURITY_LOGIN_URL;

	public final static String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";

	// 渠道标识
	public final static String QCZJ_APPID = "open.api";
	// 车辆用途（家用）
	public final static int QCZJ_PURPOSE_HOME = 1;
	// 车辆用途（运营转私人）
	public final static int QCZJ_PURPOSE_PRIVATE = 2;
	// 车辆用途（单位用车）
	public final static int QCZJ_PURPOSE_COMPANY = 3;

	// 图片上传url
	public final static String QCZJ_UPLOAD_IMAGE_URL = "http://open.api.che168.com/v1/car/uploadimage.ashx";
	// 发布车源url
	public final static String QCZJ_INSERT_CAR_URL = "http://open.api.che168.com/v1/car/release.ashx";
	// 获取销售代表url
	public final static String QCZJ_GET_SALES_URL = "http://open.api.che168.com/v1/dealer/getsales.ashx";
	// 修改车源url
	public final static String QCZJ_UPDATE_CAR_URL = "http://open.api.che168.com/v1/car/edit.ashx";
	// 设置为已售车源url
	public final static String QCZJ_SET_SALED_URL = "http://open.api.che168.com/v1/car/setsaled.ashx";
	// 获取不同状态的车源url
	public final static String QCZJ_CAR_STATE_URL = "http://open.api.che168.com/v1/car/getlist.ashx";
	// 获取单个车源的url
	public final static String QCZJ_CAR_SINGLE_URL = "http://open.api.che168.com/v1/car/get.ashx";
	// 获取品牌url
	public final static String QCZJ_GET_BRAND_URL = "http://open.api.che168.com/v1/public/getbrands.ashx";
	// 获取车系url
	public final static String QCZJ_GET_SERIES_URL = "http://open.api.che168.com/v1/public/getseriesbybrandid.ashx";
	// 获取车型url
	public final static String QCZJ_GET_PRODUCT_URL = "http://open.api.che168.com/v1/public/getproductsbyseriesid.ashx";
	// 获取颜色url
	public final static String QCZJ_GET_COLORS_URL = "http://open.api.che168.com/v1/public/getcolors.ashx";
	// 获取省url
	public final static String QCZJ_GET_PROVINCE_URL = "http://open.api.che168.com/v1/public/getprovinces.ashx";
	// 获取市url
	public final static String QCZJ_GET_CITY_URL = "http://open.api.che168.com/v1/public/getcitiesbyprovinceid.ashx";
	// 设置车辆下架url
	public final static String QCZJ_SET_INVALID_URL = "http://open.api.che168.com/v1/car/SetCarInvalid.ashx";
	// 重新发布车源url
	public final static String QCZJ_REPUBLISH_CAR_URL = "http://open.api.che168.com/v1/car/republish.ashx";

	// 行圆发布车源url
	public static String XY_INSERT_CAR_URL;

	// 行圆设置车辆上下架状态url
	public static String XY_SET_ONSALE_URL;

	// 行圆设置为已售车源url
	public static String XY_SET_SALED_URL;

	// 行圆删除车源url
	public static String XY_DELETE_CAR_URL;

	// 车300估值url
	public static String CHE300_GET_PRICE_URL;

	// 车300  token
	public static String CHE300_TOKEN;

	public static String ERP_CONTEXT_PATH;

	public static String CRM_CONTEXT_PATH;

	public static String WX_CONTEXT_PATH;

	public static String FDFS_CONTENT_PATH;

	//第一车网APIKEY
	public static String FIRST_APIKEY;
	//第一车网用户名
	public static String FIRST_USERNAME;
	//第一车网密码
	public static String FIRST_PASSWORD;
	//第一车网密钥
	public static String FIRST_SECRET;
	//第一车网发布车源url
	public static String FIRST_URL;

	//搜狐汽车AUTH
	public static String SOUHU_AUTH;
	//搜狐汽车发布车源url
	public static String SOUHU_URL;

	//启辕商铺地址（对接搜狐）
	public static String QIYUAN_ADDRESS;
	//启辕商铺联系人（对接搜狐、第一车网）
	public static String QIYUAN_LINKMAN;
	//启辕商铺联系人电话（对接搜狐、第一车网）
	public static String QIYUAN_LINKMAN_PHONE;

	//智通用户信息同步url
	public static String ZHITONG_INSERT_USER_URL;
	//智通获取token的url
	public static String ZHITONG_SELECT_TOKEN_URL;
	//智通机构编码
	public static String ZHITONG_ORGCODE;
	//智通私钥
	public static String ZHITONG_PRIVATE_KEY;
	//智通请求方标识（applicationID）
	public static String ZHITONG_APPLICATIONID;



	public static int CAR_PRINT_NUM;

	public Constant() {

	}

	public static String replaceNOS(String str) {
		if (str != null) {
			str = str.replaceAll(N, N_PRESS).replaceAll(O, O_PRESS).replaceAll(S, S_PRESS);
		}
		return str;
	}

	public void setCrmSecurityLoginUrl(String crmSecurityLoginUrl) {
		CRM_SECURITY_LOGIN_URL = crmSecurityLoginUrl;
	}

	public void setErpContextPath(String erpContextPath) {
		ERP_CONTEXT_PATH = erpContextPath;
	}

	public void setCrmContextPath(String crmContextPath) {
		CRM_CONTEXT_PATH = crmContextPath;
	}

	public void setWxContextPath(String wxContextPath) {
		WX_CONTEXT_PATH = wxContextPath;
	}

	public void setFdfsContextPath(String fdfsContextPath) {
		FDFS_CONTENT_PATH = fdfsContextPath;
	}

	public void setXyContextPath(String xyContextPath) {

		XY_INSERT_CAR_URL = xyContextPath + "qiyuan-carsource/carsources/add";
		XY_SET_ONSALE_URL = xyContextPath + "qiyuan-carsource/carsources/salestatus";
		XY_SET_SALED_URL = xyContextPath + "qiyuan-carsource/carsources/sold";
		XY_DELETE_CAR_URL = xyContextPath + "qiyuan-carsource/carsources/remove";
	}

	public void setFirstContextPath(String firstContextPath){ FIRST_URL = firstContextPath; }

	public void setFirstApiKey(String firstApiKey){ FIRST_APIKEY = firstApiKey; }

	public void setFirstUserName(String firstUserName){ FIRST_USERNAME = firstUserName; }

	public void setFirstPassword(String firstPassword){ FIRST_PASSWORD = firstPassword; }

	public void setFirstSecret(String firstSecret){ FIRST_SECRET = firstSecret; }

	public void setSouHuAuth(String souHuAuth){ SOUHU_AUTH = souHuAuth; }

	public void setSouHuUrl(String souHuUrl){ SOUHU_URL = souHuUrl; }

	public void setQiyuanAddress(String qiyuanAddress){ QIYUAN_ADDRESS = qiyuanAddress; }

	public void setQiyuanLinkman(String qiyuanLinkman){ QIYUAN_LINKMAN = qiyuanLinkman; }

	public void setQiyuanLinkmanPhone(String qiyuanLinkmanPhone){ QIYUAN_LINKMAN_PHONE = qiyuanLinkmanPhone; }

	public void setChe300ContextPath(String che300ContextPath) {
		CHE300_GET_PRICE_URL = che300ContextPath + "service/getUsedCarPrice";
	}

	public void setChe300Token(String che300Token) {
		CHE300_TOKEN = che300Token;
	}

	public void setCarPrintNum(int carPrintNum) {
		CAR_PRINT_NUM = carPrintNum;
	}

	public void setZhiTongInsertUserUrl(String zhiTongInsertUserUrl) {
		ZHITONG_INSERT_USER_URL = zhiTongInsertUserUrl;
	}

	public void setZhiTongSelectTokenUrl(String zhiTongSelectTokenUrl) {
		ZHITONG_SELECT_TOKEN_URL = zhiTongSelectTokenUrl;
	}

	public void setZhiTongOrgcode(String zhiTongOrgcode) {
		ZHITONG_ORGCODE = zhiTongOrgcode;
	}

	public void setZhiTongPrivateKey(String zhiTongPrivateKey) {
		ZHITONG_PRIVATE_KEY = zhiTongPrivateKey;
	}

	public void setZhiTongApplicationid(String zhiTongApplicationid) {
		ZHITONG_APPLICATIONID = zhiTongApplicationid;
	}



	public final static String[] BASE_CAR_ENVIRON_OPTIONS = {"国I", "国II", "国III", "国IV", "国V", "欧I", "欧II", "欧III", "欧IV", "欧V", "欧VI"};

	public final static String[] BASE_CAR_GEARBOX_OPTIONS = {"手动", "自动"};

	public final static String[] BASE_CAR_FUEL_OPTIONS = {"汽油", "柴油", "电动", "混合", "其他"};

	public static String IP_WHITE_LIST;// ip白名单

	public static void setIpWhiteList(String ipWhiteList) {
		IP_WHITE_LIST = ipWhiteList;
	}

    public final static String MODEL_MAKER_TYPE = "{'国产':1, '合资':2, '进口':3}"; //制造商类型

    //车系级别  modelMakerType 同 seriesMakerType
    public final static String SERIES_LEVEL_NAME = "{'微型车':1, '小型车':2, '紧凑型车':3, '中型车':4, '中大型车':5, '豪华车':6, '小型SUV':7, '紧凑型SUV':8, '中型SUV':9, '中大型SUV':10, '全尺寸SUV':11, 'MPV':12, '跑车':13, '皮卡':14, '微面':15, '客车':16, '卡车':17, '其它':18}";

    //public final static String MODEL_GEARBOX = "{'手动':1, '自动':2 }"; //变速箱类型
}
